<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购买行为</title>
    <link rel="stylesheet" href="css/common/reset.css">
    <style>
        button{border:0;padding:0;outline:none}
        .buyway{width:880px;margin:0 auto;font-size:14px;border-collapse:separate;border-spacing:20px}
        .countNum{overflow:hidden}
        .countNum .reduce{width:24px;text-align:center;font-size:24px;background-color:#e1e1e1;color:#a8a3a3}
        .countNum .num{float:left;width:45px}
        .countNum .add{width:24px;text-align:center;font-size:24px;background-color:#e1e1e1}
        .countNum li{float:left;width:auto;font-size:14px;background-color:#fff}
        .countNum button{display:block;width:24px;height:24px;color:#fff;background-color:#4882f0;cursor:pointer}
        .countNum input{display:inline-block;width:30px;height:24px;line-height:24px;padding:0;text-align:center}
        .buyway-btn{text-align:center}
        .buyway-btn .btn{width:128px;height:35px;line-height:35px;margin:40px 0;color:#fff;text-align:center;border-radius:35px;cursor: pointer;}
        .buyway-btn .blue-btn{background-color:#4882f0}
        .buyway-btn .yellow-btn{margin:0 20px;background-color:#ff9900}
        .errorbox{display:none;height:30px;line-height:30px;padding:5px;padding-left:30px;margin: 40px 20px 10px;font-size:14px;color:#333333;border:1px solid #dd3c10;background-color:#ffebe8}
    </style>
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.cookie.js"></script>
    <script>
        var buygoodsId = $.cookie("buygoodsId");
        console.log("buygoodsId", buygoodsId);

        $(document).ready(function () {
            $("input[type='text']").each(function () {
                if ($(this).val() == "" || $(this).val() == null) {
                    $(this).val("0");
                    $(this).parent().prev().children().eq(0).css("color", "gray");
                }
                else {
                    if ($(this).val() == "0") {
                        $(this).parent().prev().children().eq(0).css("color", "gray");
                    }

                    if ($(this).attr("id") == "ProductCompare3" || $(this).attr("id") == "InsideShopStay10" || $(this).attr("id") == "BrowseShopP3" /*|| $(this).attr("id") == "PlatformNoAcceptPeriod3"*/) {
                        if ($(this).val() >= 50) {
                            $(this).parent().next().children().eq(0).css("color", "gray");
                            return;
                        }
                    }

                    if ($(this).val() == "100") {
                        $(this).parent().next().children().eq(0).css("color", "gray");
                    }
                }
            });

            var people = $.parseJSON($.cookie(buygoodsId));
            console.log("people", people);
            people = people[0];
            console.log("====", people.ShopCollect)
            $("#ShopCollect").val(people.ShopCollect);
            $("#ProductCollect").val(people.ProductCollect);
            $("#BeforeBuyTalk").val(people.BeforeBuyTalk);
            $("#ProductCompareNot").val(people.ProductCompareNot);
            $("#ProductCompare1").val(people.ProductCompare1);
            $("#ProductCompare2").val(people.ProductCompare2);
            $("#ProductCompare3").val(people.ProductCompare3);
            $("#PlatformNoAcceptPeriodNot").val(people.PlatformNoAcceptPeriodNot);
            $("#PlatformNoAcceptPeriod1").val(people.PlatformNoAcceptPeriod1);
            $("#PlatformNoAcceptPeriod3").val(people.PlatformNoAcceptPeriod3);
            $("#BrowseShopPNot").val(people.BrowseShopPNot);
            $("#BrowseShopP1").val(people.BrowseShopP1);
            $("#BrowseShopP2").val(people.BrowseShopP2);
            $("#BrowseShopP3").val(people.BrowseShopP3);
            $("#InsideShopStayNot").val(people.InsideShopStayNot);
            $("#InsideShopStay5").val(people.InsideShopStay5);
            $("#InsideShopStay10").val(people.InsideShopStay10);

        })
        function changeBar(obj, operator, id) {
            var count = $("#" + id).val();
            if (count == "" || count == null) {
                $("#" + id).val("0");
                return;
            }
            if (operator == "+") {
                //用户点的+号
                //alert($(obj).parent().prev().prev().firstChild);
                $(obj).parent().prev().prev().children().eq(0).css("color", "#fff");  //先将-号的颜色恢复原状
                count++;
                if (id == "ProductCompare3" || id == "InsideShopStay10" || id == "BrowseShopP3" /*|| id == "PlatformNoAcceptPeriod3"*/) {
                    if (count >= 50) {
                        $("#" + id).val(50);
                        $(obj).css("color", "gray");
                        return;
                    }
                }
                if (count >= 100) {
                    //$.messager.alert('提示', "数量不能超过100", 'error');
                    $("#" + id).val(100);
                    $(obj).css("color", "gray");
                    count = 100;
                    //return;
                }
                else {
                    //count++;
                }
            }
            else {
                //用户点的-号
                $(obj).parent().next().next().children().eq(0).css("color", "#fff"); //先将+号的颜色恢复原状
                count--;
                if (count <= 0) {
                    //$.messager.alert('提示', "数量不能小于0", 'error');
                    $("#" + id).val(0);
                    $(obj).css("color", "gray");
                    count = 0;
                    //return;
                }
                else {
                    //count--;
                }
            }
            $("#" + id).val(count);
        }
        $(".buyway input").live("keyup", function () {
            var count = $(this).val();
            var id = $(this).attr("id");
            $(this).parent().prev().children().eq(0).css("color", "#fff");
            $(this).parent().next().children().eq(0).css("color", "#fff");
            if (count == "") {
                return;
            }
            if (id == "ProductCompare3") {
                if (count <= 0) {
                    $(this).parent().prev().children().eq(0).css("color", "gray");
                    return;
                }
                else if (count >= 50) {
                    $("#" + id).val(50);
                    $(this).parent().next().children().eq(0).css("color", "gray");
                    return;
                }
                else {
                    $(this).parent().prev().children().eq(0).css("color", "#fff");
                    $(this).parent().next().children().eq(0).css("color", "#fff");
                    return;
                }
            }
            if (id == "PlatformNoAcceptPeriod3") {
                if (count <= 0) {
                    $(this).parent().prev().children().eq(0).css("color", "gray");
                    return;
                }
                else {
                    $(this).parent().prev().children().eq(0).css("color", "#fff");
                    $(this).parent().next().children().eq(0).css("color", "#fff");
                    return;
                }
            }
            if (id == "BrowseShopP3") {
                if (count <= 0) {
                    $(this).parent().prev().children().eq(0).css("color", "gray");
                    return;
                }
                else if (count >= 50) {
                    $("#" + id).val(50);
                    $(this).parent().next().children().eq(0).css("color", "gray");
                    return;
                }
                else {
                    $(this).parent().prev().children().eq(0).css("color", "#fff");
                    $(this).parent().next().children().eq(0).css("color", "#fff");
                    return;
                }
            }
            if (id == "InsideShopStay10") {
                if (count <= 0) {
                    $(this).parent().prev().children().eq(0).css("color", "gray");
                    return;
                }
                else if (count >= 50) {
                    $("#" + id).val(50);
                    $(this).parent().next().children().eq(0).css("color", "gray");
                    return;
                }
                else {
                    $(this).parent().prev().children().eq(0).css("color", "#fff");
                    $(this).parent().next().children().eq(0).css("color", "#fff");
                    return;
                }
            }
            if (count <= 0) {
                $("#" + id).val(0);
                $(this).parent().prev().children().eq(0).css("color", "gray");
                count = 0;
            }
            else if (count >= 100) {
                $("#" + id).val(100);
                $(this).parent().next().children().eq(0).css("color", "gray");
                count = 100;
            }
            else {
                $(this).parent().prev().children().eq(0).css("color", "#fff");
                $(this).parent().next().children().eq(0).css("color", "#fff");
            }

        });
        function save() {
            $("#clientValidationOL").html("");
            var ShopCollect = parseInt($("#ShopCollect").val());
            if (isNaN(ShopCollect)) {
                $("<li>收藏店铺处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (ShopCollect > 100 || ShopCollect < 0) {
                $("<li>收藏店铺处比例为0-100%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }

            var ProductCollect = parseInt($("#ProductCollect").val());
            if (isNaN(ProductCollect)) {
                $("<li>产品收藏处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (ProductCollect > 100 || ProductCollect < 0) {
                $("<li>产品收藏处比例为0-100%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var BeforeBuyTalk = parseInt($("#BeforeBuyTalk").val());
            if (isNaN(BeforeBuyTalk)) {
                $("<li>拍前聊请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (BeforeBuyTalk > 100 || BeforeBuyTalk < 0) {
                $("<li>拍前聊 比例为0-100%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var ProductCompareNot = parseInt($("#ProductCompareNot").val());
            if (isNaN(ProductCompareNot)) {
                $("<li>不货比处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var ProductCompare1 = parseInt($("#ProductCompare1").val());
            if (isNaN(ProductCompare1)) {
                $("<li>货比一家处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var ProductCompare2 = parseInt($("#ProductCompare2").val());
            if (isNaN(ProductCompare2)) {
                $("<li>货比两家处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var ProductCompare3 = parseInt($("#ProductCompare3").val());
            if (isNaN(ProductCompare3)) {
                $("<li>货比三家处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (ProductCompare3 > 50 || ProductCompare3 < 0) {
                $("<li>货比三家处比例为0-50%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (ProductCompareNot + ProductCompare1 + ProductCompare2 + ProductCompare3 != 100) {
                $("<li>货比X家处相加比例必须为100</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var PlatformNoAcceptPeriodNot = parseInt($("#PlatformNoAcceptPeriodNot").val());
            if (isNaN(PlatformNoAcceptPeriodNot)) {
                $("<li>复购周期(不复购)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }

            var PlatformNoAcceptPeriod1 = parseInt($("#PlatformNoAcceptPeriod1").val());
            if (isNaN(PlatformNoAcceptPeriod1)) {
                $("<li>复购周期(一个月)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }

            var PlatformNoAcceptPeriod3 = parseInt($("#PlatformNoAcceptPeriod3").val());
            if (isNaN(PlatformNoAcceptPeriod3)) {
                $("<li>复购周期(三个月)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (PlatformNoAcceptPeriod3 < 0) {
                $("<li>复购周期(三个月)比例为0-100%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (PlatformNoAcceptPeriodNot + PlatformNoAcceptPeriod1 + PlatformNoAcceptPeriod3 != 100) {
                $("<li>复购周期处相加比例必须为100</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }


            var BrowseShopPNot = parseInt($("#BrowseShopPNot").val());
            if (isNaN(BrowseShopPNot)) {
                $("<li>浏览深度(不浏览)请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var BrowseShopP1 = parseInt($("#BrowseShopP1").val());
            if (isNaN(BrowseShopP1)) {
                $("<li>浏览深度(店内一款)请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var BrowseShopP2 = parseInt($("#BrowseShopP2").val());
            if (isNaN(BrowseShopP2)) {
                $("<li>浏览深度(店内2款)请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            var BrowseShopP3 = parseInt($("#BrowseShopP3").val());
            if (isNaN(BrowseShopP3)) {
                $("<li>浏览深度(店内3款)请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (BrowseShopP3 > 50 || BrowseShopP3 < 0) {
                $("<li>浏览深度(店内3款)比例为0-50%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (BrowseShopPNot + BrowseShopP1 + BrowseShopP2 + BrowseShopP3 != 100) {
                $("<li>浏览深度处相加比例必须为100</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }


            var InsideShopStayNot = parseInt($("#InsideShopStayNot").val());
            if (isNaN(InsideShopStayNot)) {
                $("<li>停留时间(不限制)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }

            var InsideShopStay5 = parseInt($("#InsideShopStay5").val());
            if (isNaN(InsideShopStay5)) {
                $("<li>停留时间(5分钟)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }

            var InsideShopStay10 = parseInt($("#InsideShopStay10").val());
            if (isNaN(InsideShopStay10)) {
                $("<li>停留时间(10分钟)处请输入数字</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (InsideShopStay10 > 50 || InsideShopStay10 < 0) {
                $("<li>停留时间(10分钟)比例为0-50%之间</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            if (InsideShopStayNot + InsideShopStay5 + InsideShopStay10 != 100) {
                $("<li>停留时间处相加比例必须为100</li>").appendTo($("#clientValidationOL"));
                $("#clientValidation").show();
                return false;
            }
            // $("#fm").submit();
            var buyData = [{
                "ShopCollect": ShopCollect,
                "ProductCollect": ProductCollect,
                "BeforeBuyTalk": BeforeBuyTalk,
                "ProductCompareNot": ProductCompareNot,
                "ProductCompare1": ProductCompare1,
                "ProductCompare2": ProductCompare2,
                "ProductCompare3": ProductCompare3,
                "PlatformNoAcceptPeriodNot": PlatformNoAcceptPeriodNot,
                "PlatformNoAcceptPeriod1": PlatformNoAcceptPeriod1,
                "PlatformNoAcceptPeriod3": PlatformNoAcceptPeriod3,
                "BrowseShopPNot": BrowseShopPNot,
                "BrowseShopP1": BrowseShopP1,
                "BrowseShopP2": BrowseShopP2,
                "BrowseShopP3": BrowseShopP3,
                "InsideShopStayNot": InsideShopStayNot,
                "InsideShopStay5": InsideShopStay5,
                "InsideShopStay10": InsideShopStay10
            }];
            $.cookie(buygoodsId, JSON.stringify(buyData));
            // return;
            var index = parent.layer.getFrameIndex(window.name);
            parent.layer.close(index);//关闭弹出层
            parent.location.reload();//更新父级页面（提示：如果需要跳转到其它页面见下文）
        }
        function DefauleSet() {
            $("#ShopCollect").val(20);
            $("#ProductCollect").val(50);
            $("#BeforeBuyTalk").val(50);
            $("#ProductCompareNot").val(10);
            $("#ProductCompare1").val(30);
            $("#ProductCompare2").val(40);
            $("#ProductCompare3").val(20);
            $("#PlatformNoAcceptPeriodNot").val(10);
            $("#PlatformNoAcceptPeriod1").val(90);
            $("#PlatformNoAcceptPeriod3").val(0);
            $("#BrowseShopPNot").val(10);
            $("#BrowseShopP1").val(30);
            $("#BrowseShopP2").val(50);
            $("#BrowseShopP3").val(10);
            $("#InsideShopStayNot").val(20);
            $("#InsideShopStay5").val(60);
            $("#InsideShopStay10").val(20);
            $("#clientValidationOL").hide();
        }

    </script>
</head>

<body>
    <form id="fm">
        <div class="errorbox" id="clientValidation">
            <ol style='list-style-type: decimal' id="clientValidationOL">
            </ol>
        </div>
        <table class="buyway">
            <tbody>
                <tr>
                    <td>收藏店铺：</td>
                    <td></td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ShopCollect')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ShopCollect 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ShopCollect 字段是必需的。"
                                    id="ShopCollect" maxlength="3" name="shopcollect" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value=""><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ShopCollect')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>收藏商品：</td>
                    <td></td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ProductCollect')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ProductCollect 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ProductCollect 字段是必需的。"
                                    id="ProductCollect" maxlength="3" name="goodscollect" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ProductCollect')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>拍前聊：</td>
                    <td></td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','BeforeBuyTalk')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 BeforeBuyTalk 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="BeforeBuyTalk 字段是必需的。"
                                    id="BeforeBuyTalk" maxlength="3" name="chat" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','BeforeBuyTalk')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>货比X家：</td>
                    <td>不货比</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ProductCompareNot')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ProductCompareNot 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ProductCompareNot 字段是必需的。"
                                    id="ProductCompareNot" maxlength="3" name="nofb" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ProductCompareNot')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>货比一家</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ProductCompare1')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ProductCompare1 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ProductCompare1 字段是必需的。"
                                    id="ProductCompare1" maxlength="3" name="fb1" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ProductCompare1')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>货比两家</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ProductCompare2')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ProductCompare2 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ProductCompare2 字段是必需的。"
                                    id="ProductCompare2" maxlength="3" name="fb2" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ProductCompare2')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>货比三家</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','ProductCompare3')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 ProductCompare3 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="ProductCompare3 字段是必需的。"
                                    id="ProductCompare3" maxlength="3" name="fb3" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','ProductCompare3')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>复购周期：</td>
                    <td>不限制</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','PlatformNoAcceptPeriodNot')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 PlatformNoAcceptPeriodNot 必须是一个数字。"
                                    data-val-range="范围为0-100之间" data-val-range-max="100" data-val-range-min="0"
                                    data-val-required="PlatformNoAcceptPeriodNot 字段是必需的。" id="PlatformNoAcceptPeriodNot"
                                    maxlength="3" name="nofg" onkeyup="value=value.replace(/[^0-9]/g,'')" type="text"
                                    value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','PlatformNoAcceptPeriodNot')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>一个月</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','PlatformNoAcceptPeriod1')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 PlatformNoAcceptPeriod1 必须是一个数字。"
                                    data-val-range="范围为0-100之间" data-val-range-max="100" data-val-range-min="0"
                                    data-val-required="PlatformNoAcceptPeriod1 字段是必需的。" id="PlatformNoAcceptPeriod1"
                                    maxlength="3" name="fg1" onkeyup="value=value.replace(/[^0-9]/g,'')" type="text"
                                    value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','PlatformNoAcceptPeriod1')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>三个月</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','PlatformNoAcceptPeriod3')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 PlatformNoAcceptPeriod3 必须是一个数字。"
                                    data-val-range="范围为0-100之间" data-val-range-max="100" data-val-range-min="0"
                                    data-val-required="PlatformNoAcceptPeriod3 字段是必需的。" id="PlatformNoAcceptPeriod3"
                                    maxlength="3" name="fg2" onkeyup="value=value.replace(/[^0-9]/g,'')" type="text"
                                    value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','PlatformNoAcceptPeriod3')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>浏览深度：</td>
                    <td>不浏览</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','BrowseShopPNot')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 BrowseShopPNot 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="BrowseShopPNot 字段是必需的。"
                                    id="BrowseShopPNot" maxlength="3" name="noll" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','BrowseShopPNot')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>店内一款</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','BrowseShopP1')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 BrowseShopP1 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="BrowseShopP1 字段是必需的。"
                                    id="BrowseShopP1" maxlength="3" name="ll1" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','BrowseShopP1')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>店内两款</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','BrowseShopP2')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 BrowseShopP2 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="BrowseShopP2 字段是必需的。"
                                    id="BrowseShopP2" maxlength="3" name="ll2" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','BrowseShopP2')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>店内三款</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','BrowseShopP3')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 BrowseShopP3 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="BrowseShopP3 字段是必需的。"
                                    id="BrowseShopP3" maxlength="3" name="ll3" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','BrowseShopP3')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
                <tr>
                    <td>停留时间：</td>
                    <td>不限制</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','InsideShopStayNot')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 InsideShopStayNot 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="InsideShopStayNot 字段是必需的。"
                                    id="InsideShopStayNot" maxlength="3" name="st1" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','InsideShopStayNot')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>五分钟</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','InsideShopStay5')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 InsideShopStay5 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="InsideShopStay5 字段是必需的。"
                                    id="InsideShopStay5" maxlength="3" name="st2" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','InsideShopStay5')">+</button>
                            </li>
                        </ul>
                    </td>
                    <td>十分钟</td>
                    <td>
                        <ul class="countNum">
                            <li class="reduce">
                                <button type="button" onclick="changeBar(this,'-','InsideShopStay10')">-</button>
                            </li>
                            <li class="num">
                                <input data-val="true" data-val-number="字段 InsideShopStay10 必须是一个数字。" data-val-range="范围为0-100之间"
                                    data-val-range-max="100" data-val-range-min="0" data-val-required="InsideShopStay10 字段是必需的。"
                                    id="InsideShopStay10" maxlength="3" name="st3" onkeyup="value=value.replace(/[^0-9]/g,'')"
                                    type="text" value="" /><span class="inp">%</span>
                            </li>
                            <li class="add">
                                <button type="button" onclick="changeBar(this,'+','InsideShopStay10')">+</button>
                            </li>
                        </ul>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="buyway-btn">
            <button class="btn blue-btn" onclick="DefauleSet()" type="button">使用推荐比例</button>
            <button class="btn yellow-btn" onclick="save()" type="button">保存</button>
            <!-- <button class="btn blue-btn">取消</button> -->
        </div>
    </form>

</body>

</html>